package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	inputReader := bufio.NewReader(os.Stdin)
	fmt.Println("请输入您的名称: ")
	input, err := inputReader.ReadString('\n')
	if err != nil {
		fmt.Println("输入错误, 程序终止.")
		return
	}

	fmt.Println("您的名字是: ", input)

	// delimiter for unix: \n, for windows: \r\n
	switch input {
	case "Hanmeimei\n":
		fmt.Println("Welcome Hanmeimei!")
	case "Lilei\n":
		fmt.Println("Welcome Lilei!")
	default:
		fmt.Println("抱歉这里不欢迎你, 再见")
	}

	switch input {
	case "Hanmeimei\n":
		fallthrough
	case "LiLei\n":
		fallthrough
	case "Hanhua\n":
		fmt.Printf("Welcome %s\n", input)
	default:
		fmt.Println("抱歉这里不欢迎你, 再见了")

	}

	switch input {
	case "Lilei\n", "Hanhua\n", "Linfeng\n":
		fmt.Printf("Welcome back %s\n", input)
	default:
		fmt.Println("再见!")
	}
}
